package com.kasinf.sample.web.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.kasinf.sample.web.entity.DesensitizeEntity;
import com.kasinf.sample.web.entity.ReqObj;
import org.springframework.web.bind.annotation.*;

/**
 * @Author : Kaiser
 * @Date: 2025/6/3  11:15
 */
@RestController
@RequestMapping("test")
public class TestController {


    @SaIgnore
    @GetMapping("touch")
    public String touch(String message) {
        return message;
    }

    @SaIgnore
    @PostMapping("touch")
    public String touchPost(@RequestBody ReqObj request) {
        System.out.println(request);
        return "ok";
    }

    @GetMapping("desensitize")
    public DesensitizeEntity desensitize(){
        return DesensitizeEntity.builder()
                .chineseName("张三")
                .password("Abcd@78dgga#!")
                .email("583075641@qq.com")
                .mobile("13800000000")
                .fixedPhone("010-12345678")
                .bankCard("6228480400000001")
                .carLicense("京A88888")
                .idCard("110101199001011234")
                .build();
    }
}
